package com.project.lx.gettxtfilename.RecycleView;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

import com.project.lx.baseproject.base.BaseActivity;
import com.project.lx.gettxtfilename.R;
import com.project.lx.gettxtfilename.RecycleView.adapter.HomeAdapter;
import com.project.lx.gettxtfilename.RecycleView.adapter.MainAdapter;
import com.project.lx.gettxtfilename.RecycleView.divider.DividerItemDecoration;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class RecViewActivity extends BaseActivity {

//    List mList;
//    HomeAdapter homeAdapter;
//
//    MainAdapter mainAdapter;
//
//    @BindView(R.id.rec_view)
//    RecyclerView recView;
//
//    Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public void initRootView() {
        setContentView(R.layout.test_button);
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {
//        mList = new ArrayList();
//        for (int i = 'A'; i < 'z'; i++) {
////            mList.add("" + (char) i);
//        }
//
//        mainAdapter = new MainAdapter(R.layout.list_item, mList);
//        View emptyView = LayoutInflater.from(this).inflate(R.layout.activity_rx_bus1, null);
//        button = (Button) emptyView.findViewById(R.id.btn_bus_1);
//        button.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                for (int i = 'A'; i < 'z'; i++) {
//                    mList.add("" + (char) i);
//                    mainAdapter.setNewData(mList);
//                }
//            }
//        });
//        mainAdapter.setEmptyView(emptyView);
//
//
////        homeAdapter = new HomeAdapter(this, mList);
//        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
//        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
//        recView.setLayoutManager(layoutManager);
//        recView.setAdapter(mainAdapter);


////        recView.setItemAnimator(null);
//        homeAdapter.setOnItemClickLitener(new HomeAdapter.OnItemClickLitener() {
//            @Override
//            public void onItemClick(View view, int position) {
//                Toast.makeText(RecViewActivity.this, "你点击了第" + position + "个Item", Toast.LENGTH_SHORT).show();
//            }
//
//            @Override
//            public void onItemLongClick(View view, int position) {
//                Toast.makeText(RecViewActivity.this, "你长按了第" + position + "个Item", Toast.LENGTH_SHORT).show();
//                homeAdapter.notifyItemRemoved(position);
//            }
//        });
//        recView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
    }

    @Override
    public void initListener() {

    }
}
